A device such as a smartphone, tablet computer, or electronic watch may include a button that is usable to provide input to the device. In some cases, the button may be a volume button. In some cases, the button may be context-sensitive, and may be configured to receive different types of input based on an active context (e.g., an active utility or application) running on the device. Such a button may be located along a sidewall of a device, and may move toward the sidewall when a user presses the button. Pressing the button with an applied force that exceeds a threshold may trigger actuation (e.g., a state change) of a mechanical switch disposed behind the button. In some cases, a button may pivot along the sidewall. For example, the top of the button may be pressed and pivot toward the sidewall to increase a sound volume, or the bottom of the button may be pressed and pivot toward the sidewall to decrease the sound volume.